#indoor

#!/bin/bash
sleep 2s
gnome-terminal -x bash -c "cd ~/media;./mediamtx; exec bash"
sleep 4s
gnome-terminal -x bash -c "source $HOME/livox_ws/devel/setup.bash;roslaunch livox_ros_driver2 msg_MID360.launch; exec bash"
sleep 20s
gnome-terminal -x bash -c "source $HOME/zny_ws/devel/setup.bash; roslaunch fast_lio mapping_mid360.launch range:=10; exec bash"
sleep 10s
gnome-terminal -x bash -c "source $HOME/zny_ws/devel/setup.bash;roslaunch px4_realsense_bridge bridge.launch;exec bash" 
sleep 5s  
gnome-terminal -x bash -c "source $HOME/zny_ws/devel/setup.bash;roslaunch mavros px4_bak.launch tgt_system:=1;exec bash" 
sleep 3s  
gnome-terminal -x bash -c "source $HOME/zny_ws/devel/setup.bash;roslaunch off_board_test main.launch vehicle_id:=1;exec bash" 
sleep 3s
gnome-terminal -x bash -c "source $HOME/zny_ws/devel/setup.bash; roslaunch ego_planner simple_run.launch resolusion_zh:=0.13; exec bash"
sleep 3s
gnome-terminal -x bash -c "source $HOME/zny_ws/devel/setup.bash; roslaunch lidar_detect main.launch; exec bash"
sleep 3s
gnome-terminal -x bash -c "source $HOME/zny_ws/devel/setup.bash; python3 $HOME/zny_ws/src/wlcb_exploration/relative_pkg/det/scripts/cam0_det.py; exec bash"
sleep 3s
gnome-terminal -x bash -c "source $HOME/zny_ws/devel/setup.bash; roslaunch swarm_ros_bridge gcs_bridge.launch; exec bash"
sleep 3s
gnome-terminal -x bash -c "source $HOME/zny_ws/devel/setup.bash; roslaunch sdplt SDPltDDSPose.launch vehicle_id:=1; exec bash"
sleep 3s
gnome-terminal -x bash -c "source $HOME/zny_ws/devel/setup.bash; python3 $HOME/zny_ws/src/wlcb_exploration/relative_pkg/det/scripts/cam_rtsp.py --ip 194.194.194.1 --uav 1; exec bash"
wait
exit 0


#outdoor

#!/bin/bash
sleep 2s
gnome-terminal -x bash -c "cd ~/media;./mediamtx; exec bash"
sleep 3s  
gnome-terminal -x bash -c "source $HOME/zny_ws/devel/setup.bash;roslaunch mavros px4_bak.launch tgt_system:=13 gcs_url:=udp://@194.194.194.100:12313;exec bash" 
sleep 3s  
gnome-terminal -x bash -c "source $HOME/zny_ws/devel/setup.bash;roslaunch off_board_test main.launch vehicle_id:=13;exec bash" 
sleep 3s
gnome-terminal -x bash -c "source $HOME/zny_ws/devel/setup.bash; roslaunch lidar_detect main.launch; exec bash"
sleep 3s
gnome-terminal -x bash -c "source $HOME/zny_ws/devel/setup.bash; python3 $HOME/zny_ws/src/wlcb_exploration/relative_pkg/det/scripts/cam0_det.py; exec bash"
sleep 3s
gnome-terminal -x bash -c "source $HOME/zny_ws/devel/setup.bash; roslaunch swarm_ros_bridge gcs_bridge.launch; exec bash"
sleep 3s
gnome-terminal -x bash -c "source $HOME/zny_ws/devel/setup.bash; roslaunch sdplt SDPltDDSPose.launch vehicle_id:=13; exec bash"
sleep 3s
gnome-terminal -x bash -c "source $HOME/zny_ws/devel/setup.bash; python3 $HOME/zny_ws/src/wlcb_exploration/relative_pkg/det/scripts/cam_rtsp.py --ip 194.194.194.13 --uav 13; exec bash"
wait
exit 0
